package com.yjt.auth.common.bean.domain.role;

import java.io.Serializable;


public abstract class AbstractMngRole implements Serializable {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String description;//角色描述
	private String id;//角色id
	private String name;//角色名称
	private boolean validate = true;//是否合法
	
	public AbstractMngRole() {}
	public AbstractMngRole(String description, String id, String name,
			boolean validate) {
		super();
		this.description = description;
		this.id = id;
		this.name = name;
		this.validate = validate;
	}
	public String getDescription() {
		return description;
	}
	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public boolean isValidate() {
		return validate;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValidate(boolean validate) {
		this.validate = validate;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AbstractMngRole other = (AbstractMngRole) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
}
